package hottargui.standard;

import java.util.*;

import hottargui.framework.PlayerColor;
import hottargui.framework.TurnSequenceStrategy;

public class StandardTurnSequenceStrategy implements TurnSequenceStrategy {

	List<PlayerColor> sequence;
	int idx;
	
	public StandardTurnSequenceStrategy()
	{
		sequence = new ArrayList<PlayerColor>();
		
		sequence.add(PlayerColor.Red);
		sequence.add(PlayerColor.Green);
		sequence.add(PlayerColor.Blue);
		sequence.add(PlayerColor.Yellow);
		
		idx = 0;
	}
	
	public PlayerColor nextPlayer() {
		PlayerColor next = sequence.get(idx % sequence.size());
		idx++;
		return next;
	}

	/**
	 * Initial value for playersLeftInTurn is undefined
	 */
	public int playersLeftInTurn() {
		return (sequence.size() - (idx % sequence.size())) % sequence.size();
	}
	
	public void startNewTurn(int diceValue)
	{
		// this space for rent
	}

}
